<?php
/**
 * Created by PhpStorm.
 * User: 王松
 * Time: 2017/6/12 15:30
 */

namespace App\Transformers;

use App\Models\PersonalHistory;
use League\Fractal\TransformerAbstract;

class PersonalHistoryTransformer extends TransformerAbstract
{
    public function transform(PersonalHistory $history)
    {

        return [
            'id'         => $history->id,
            'smoke'      => $history->smoke,
            'stop_smoke' => $history->stop_smoke,
            'drink'      => $history->drink,
            'stop_drink' => $history->stop_drink,
            'remark'     => $history->remark,
        ];
    }
}